<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>动态参数</title>
</head>
<body>
<script>
    function addPrefix(prefix,...word) {
        const prefixWord = [];
        for(let i = 0;i < word.length ;i++){
            prefixWord[i] = prefix + word[i];
        }
        return prefixWord;
    }
    console.log(addPrefix("王","者","荣","耀"));
</script>
</body>
</html>